import {userLoginState} from "../../../store/user";
import {Redirect} from "react-router-dom";
import React from "react";
import {useRecoilValue} from "recoil";

const Login = (props: any) => {
    const isLogin = useRecoilValue(userLoginState);

    // 如果已经登录则重定向到首页
    if (isLogin) {
        return <Redirect to={'/'}/>;
    }

    return (
        <div>登录中...</div>
    )
};

export default Login;
